package com.groupname.dangerousdelves;

/**
 *  This data structure holds information about the events pertaining to the
 *  opening of doors in the dungeon.
 *
 *  @author Chris Fieldman (Chrisf90)
 *  @version 2012.11.03
 */
public class EventData_Open_Door
    implements IEventData
{
    //~-------------------------------------------------------------------------
    // Member Variables
    private int x;
    private int y;
    private int id;

    //~-------------------------------------------------------------------------
    // Constructors
    /**
     * Create a new EventData_Open_Door object.
     * @param newX The horizontal position of the door
     * @param newY The vertical position of the door
     * @param newId The id of the room the door leads into
     */
    public EventData_Open_Door(int newX, int newY, int newId)
    {
        this.x = newX;
        this.y = newY;
        this.id = newId;
    }

    //~-------------------------------------------------------------------------
    // Methods
    public EventType getEventType()
    {
        return EventType.OpenDoor;
    }

    // ----------------------------------------------------------
    /**
     * Retrieves the horizontal position of the door.
     * @return The horizontal position of the door
     */
    public int getX()
    {
        return this.x;
    }

    // ----------------------------------------------------------
    /**
     * Retrieves the vertical position of the door.
     * @return The vertical position of the door
     */
    public int getY()
    {
        return this.y;
    }

    // ----------------------------------------------------------
    /**
     * Retrieves the id of the room the door leads into.
     * @return The id of the room the door leads into
     */
    public int getId()
    {
        return this.id;
    }
}